import yunRequest from "./api";

const baseUrl = getApp().globalData.apiBaseUrl;

// 上传投诉意见
export function uploadAdvise(latitude, longitude ,phone, location, fullAddress, firstAddress, secondAddress, content, stateCode, imgList, url,source, time, category) {
  let uploadurl = baseUrl + "/advise/uploadAdvise"
  return yunRequest.post(uploadurl, {
    latitude,
    longitude ,
    phone,
    location,
    fullAddress,
    firstAddress,
    secondAddress,
    content,
    url,
    source,
    category,
    time,
    stateCode,
    imgList
  });
}

// 驳回投诉意见
export function rejectedAdvise(id) {
  let url = baseUrl + "/advise/rejectedAdvise"
  return yunRequest.post(url, {
    id
  });
}
// 删除列表
export function deleteAdvise(adviseId) {
  let url = baseUrl + "/advise/deleteAdvise"
  return yunRequest.get(url, {
    adviseId
  });
}
// 分配辖区负责人
export function sentAddress(id, firstAddress, secondAddress) {
  let url = baseUrl + "/advise/sentAddress"
  return yunRequest.post(url, {
    id,
    firstAddress,
    secondAddress
  });
}